package com.syni.mdd.yhd.common.all.controller.api;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.BmsDxGroupBuyService;
import com.syni.mdd.yhd.common.all.service.api.AuroraPushService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className ApiAuroraPushController
 * @description TOO
 * @Author cfx
 * @DATE 2019/7/17 9:06
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/apiGroupBuy")
public class ApiBmsGroupBuyController {
    @Autowired
    AuroraPushService auroraPushService;

    @Autowired
    BmsDxGroupBuyService bmsDxGroupBuyService;

    @PostMapping("/createGroupBuy")
    @CheckParams(params = {"groupBuyId"})
    public Map<String,Object> push(@RequestBody ParamsMap paramsMap){
        Integer groupBuyId = paramsMap.getInteger("groupBuyId");
        return bmsDxGroupBuyService.postLimitBuyLogic(groupBuyId);
    }



}
